package cn.com.org.base;

import javax.websocket.HandshakeResponse;
import javax.websocket.server.HandshakeRequest;
import javax.websocket.server.ServerEndpointConfig;
import javax.websocket.server.ServerEndpointConfig.Configurator;

public class WsocketConfigurator extends Configurator {
	@Override
	public void modifyHandshake(ServerEndpointConfig sec,
			HandshakeRequest request, HandshakeResponse response) {
		System.out.println(request.getHeaders().get("origin"));
//		 System.out.println(request.getHeaders().get("cookie"));
//		 System.out.println(request.getRequestURI().getHost());
//		 System.out.println(request.getHeaders());
//		 System.out.println("====================================");
		// HttpSession httpSession=(HttpSession) request.getHttpSession();
		         sec.getUserProperties().put("Uname","WSSWWW");

		//super.modifyHandshake(sec, request, response);
	}
}
